package com.daiyang.campus_lucky_draw;

import com.daiyang.campus_lucky_draw.common.utils.JacksonUtil;
import com.daiyang.campus_lucky_draw.mapper.DO.UserDO;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class Json {
    @Test
    public void test() {
        UserDO userDO = new UserDO();
        userDO.setPassword("123456");
        userDO.setUserName("admin");
        String s=JacksonUtil.writeValueAsString(userDO);
        System.out.println(s);
        System.out.println(JacksonUtil.readValue(s, UserDO.class));
    }
}
